// JavaScript Document
window.onsubmit=SubmitForm;
function SubmitForm() {
		var form = document.forms[0];
		var bRequired = true;
		if ((form.gender.selectedIndex < 1) ||
		(form.fname.value.length < 1) ||
		(form.lname.value.length < 1) ||
		(form.RecoveryEmailAddress.value.length < 1) ||
		(form.RecoveryPhoneNumber.value.length < 1) ||	
		(form.password.value.length < 1) ||
		(form.copassword.value.length < 1) ||
		(form.city.selectedIndex < 1) ||
		(form.id.selectedIndex < 1) ||	
		(form.title.selectedIndex < 1)) {
			alert("Please fill out all the required fields.");
			bRequired = false;
		}
		
		if (!bRequired) return false;
		
		form.gender_sel.value = form.gender.selectedIndex;
		form.title_sel.value = form.title.selectedIndex;
		form.city_sel.value = form.city.selectedIndex;
	
		
	form.submit();
	}